home *** CD-ROM | disk | FTP | other *** search
/ All for Cell Phones: Sony Ericsson / Sony-Ericsson 2004.iso / Java / ClienteChat / Cliente Chat.jar / com / xibaro / chat / Entrada.class (.txt) < prev    next >
Encoding:
Java Class File  |  2002-04-23  |  1.0 KB  |  40 lines

  1. package com.xibaro.chat;
  2.  
  3. import java.io.IOException;
  4. import java.io.InputStream;
  5.  
  6. public class Entrada extends Thread {
  7.    private Cliente jefe;
  8.    // $FF: renamed from: in java.io.InputStream
  9.    private InputStream field_0;
  10.  
  11.    public Entrada(Cliente var1, InputStream var2) {
  12.       this.jefe = var1;
  13.       this.field_0 = var2;
  14.    }
  15.  
  16.    public void run() {
  17.       String var1 = "";
  18.  
  19.       int var2;
  20.       try {
  21.          while((var2 = this.field_0.read()) != -1) {
  22.             char var3 = (char)var2;
  23.             if (var3 == '\n') {
  24.                if (var1.length() > 0) {
  25.                   this.jefe.recibido(var1);
  26.                }
  27.  
  28.                var1 = "";
  29.             } else {
  30.                var1 = var1 + var3;
  31.             }
  32.          }
  33.       } catch (IOException var5) {
  34.       }
  35.  
  36.       this.jefe.mensajeEstado(Diccio.frase(18));
  37.       this.jefe.finTransmision();
  38.    }
  39. }
  40.